{% extends 'myhome/index.html'%}
{% block tit %}
<title>我的订单</title>
{% endblock %}

{% block css %}
<link href="/static/myhome/css/personal.css" rel="stylesheet" type="text/css">
<link href="/static/myhome/css/orstyle.css" rel="stylesheet" type="text/css">
{% endblock %}


{% block con %}
<div class="center">
    <div class="col-main">
        <div class="main-wrap">

            <div class="user-order">

                <!--标题 -->
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>Order</small></div>
                </div>
                <hr>

                <div class="am-tabs am-tabs-d2 am-margin" data-am-tabs="">

                    <ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
                        <li class="am-active"><a href="#tab1">所有订单</a></li>
                        <li><a href="#tab2">待付款</a></li>
                        <li><a href="#tab3">待发货</a></li>
                        <li><a href="#tab4">待收货</a></li>
                        <li><a href="#tab5">待评价</a></li>
                    </ul>

                    <div class="am-tabs-bd" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
                        
                        <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                            <div class="order-top">
                                <div class="th th-item">
                                    商品
                                </div>
                                <div class="th th-price">
                                    单价
                                </div>
                                <div class="th th-number">
                                    数量
                                </div>
                                <div class="th th-operation">
                                    商品操作
                                </div>
                                <div class="th th-amount">
                                    合计
                                </div>
                                <div class="th th-status">
                                    交易状态
                                </div>
                                <div class="th th-change">
                                    交易操作
                                </div>
                            </div>

                            <div class="order-main">
                                <div class="order-list">
                                    
                                {% for v in user %}
                                    <div class="order-status5">
                                        <div class="order-title">
                                            <div class="dd-num">订单编号：<a href="javascript:;">{{ v.id }}</a></div>
                                            <span>成交时间：{{ v.addtime }}</span>
                                            <!--    <em>店铺：小桔灯</em>-->
                                        </div>
                                        <div class="order-content">
                                            <div class="order-left">
                                            {% for vv in v.orderinfo_set.all %}
                                                <ul class="item-list">
                                                    <li class="td td-item">
                                                        <div class="item-pic">
                                                            <a href="#" class="J_MakePoint">
                                                                <img src="{{ vv.pic_url }}" class="itempic J_ItemImg">
                                                            </a>
                                                        </div>
                                                        <div class="item-info">
                                                            <div class="item-basic-info">
                                                                <a href="#">
                                                                    <p>{{ vv.title }}</p>
                                                                    
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="td td-price">
                                                        <div class="item-price">
                                                            {{ vv.price }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-number">
                                                        <div class="item-number">
                                                            <span>×</span>{{ vv.num }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-operation">
                                                        <div class="item-operation">
                                                            
                                                        </div>
                                                    </li>
                                                </ul>
                                            {% endfor %}
                                            </div>
                                            <div class="order-right">
                                                <li class="td td-amount">
                                                    <div class="item-amount">
                                                        合计：{{ v.totalprice }}
                                                        
                                                    </div>
                                                </li>
                                                <div class="move-right">
                                                    <li class="td td-status">
                                                        <div class="item-status">
                                                            <p class="Mystatus">
                                                                {% if v.status == 0 %}
                                                                    未支付
                                                                {% elif v.status == 1 %}
                                                                    已支付,待发货
                                                                {% elif v.status == 2 %}
                                                                    已发货,待收货
                                                                {% elif v.status == 3%}
                                                                    待评价
                                                                {% endif %}
                                                            </p>
                                                            <p class="order-info"><a href="orderinfo.html">订单详情</a></p>
                                                            <p class="order-info"><a href="logistics.html">查看物流</a></p>
                                                        </div>
                                                    </li>
                                                    <li class="td td-change">
                                                        <div>
                                                            <a href="{% url 'myhome_myinfo_delorder' %}?uid={{ v.id }}"  class="am-btn am-btn-danger anniu">删除订单</a>
                                                        </div>
                                                    </li>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                {% endfor %}
                            
                                </div>

                            </div>
                        </div>
                        
                        <div class="am-tab-panel am-fade" id="tab2">

                            <div class="order-top">
                                <div class="th th-item">
                                    商品
                                </div>
                                <div class="th th-price">
                                    单价
                                </div>
                                <div class="th th-number">
                                    数量
                                </div>
                                <div class="th th-operation">
                                    商品操作
                                </div>
                                <div class="th th-amount">
                                    合计
                                </div>
                                <div class="th th-status">
                                    交易状态
                                </div>
                                <div class="th th-change">
                                    交易操作
                                </div>
                            </div>

                            <div class="order-main">
                                <div class="order-list">

                                    {% for v in dfk %}
                                    <div class="order-status1">
                                        <div class="order-title">
                                            <div class="dd-num">订单编号：<a href="javascript:;">{{ v.id }}</a></div>
                                            <span>成交时间：{{ v.addtime }}</span>
                                            <!--    <em>店铺：小桔灯</em>-->
                                        </div>
                                        <div class="order-content">
                                            <div class="order-left">
                                            {% for v1 in v.orderinfo_set.all %}
                                                <ul class="item-list">
                                                    <li class="td td-item">
                                                        <div class="item-pic">
                                                            <a href="#" class="J_MakePoint">
                                                                <img src="{{ v1.pic_url }}" class="itempic J_ItemImg">
                                                            </a>
                                                        </div>
                                                        <div class="item-info">
                                                            <div class="item-basic-info">
                                                                <a href="#">
                                                                    <p>{{ v1.title }}</p>
                                                                    
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="td td-price">
                                                        <div class="item-price">
                                                            {{ v1.price }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-number">
                                                        <div class="item-number">
                                                            <span>×</span>{{ v1.num }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-operation">
                                                        <div class="item-operation">

                                                        </div>
                                                    </li>
                                                </ul>
                                             {% endfor %}
                                               
                                            </div>
                                           
                                            <div class="order-right">
                                                <li class="td td-amount">
                                                    <div class="item-amount">
                                                        合计：{{ v.totalprice }}
                                                        
                                                    </div>
                                                </li>
                                                <div class="move-right">
                                                    <li class="td td-status">
                                                        <div class="item-status">
                                                            <p class="Mystatus">等待买家付款</p>
                                                            <p class="order-info"><a href="#">取消订单</a></p>

                                                        </div>
                                                    </li>
                                                    <li class="td td-change">
                                                        <a href="pay.html">
                                                        <div class="am-btn am-btn-danger anniu">
                                                            一键支付</div></a>
                                                    </li>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                    {% endfor %}
                                </div>

                            </div>
                        </div>
                        <div class="am-tab-panel am-fade" id="tab3">
                            <div class="order-top">
                                <div class="th th-item">
                                    商品
                                </div>
                                <div class="th th-price">
                                    单价
                                </div>
                                <div class="th th-number">
                                    数量
                                </div>
                                <div class="th th-operation">
                                    商品操作
                                </div>
                                <div class="th th-amount">
                                    合计
                                </div>
                                <div class="th th-status">
                                    交易状态
                                </div>
                                <div class="th th-change">
                                    交易操作
                                </div>
                            </div>

                            <div class="order-main">
                                <div class="order-list">

                                    {% for v in dfh %}
                                    <div class="order-status2">
                                        <div class="order-title">
                                            <div class="dd-num">订单编号：<a href="javascript:;">{{ v.id }}</a></div>
                                            <span>成交时间：{{ v.addtime }}</span>
                                            <!--    <em>店铺：小桔灯</em>-->
                                        </div>
                                        <div class="order-content">
                                            <div class="order-left">

                                                {% for v1 in v.orderinfo_set.all %}
                                                <ul class="item-list">
                                                    <li class="td td-item">
                                                        <div class="item-pic">
                                                            <a href="#" class="J_MakePoint">
                                                                <img src="{{ v1.pic_url }}" class="itempic J_ItemImg">
                                                            </a>
                                                        </div>
                                                        <div class="item-info">
                                                            <div class="item-basic-info">
                                                                <a href="#">
                                                                    <p>{{ v1.title }}</p>
                                                                    
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="td td-price">
                                                        <div class="item-price">
                                                            {{ v1.price }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-number">
                                                        <div class="item-number">
                                                            <span>×</span>{{ v1.num }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-operation">
                                                        <div class="item-operation">
                                                            <a href="refund.html">退款</a>
                                                        </div>
                                                    </li>
                                                </ul>
                                                {% endfor %}

                                            </div>
                                            <div class="order-right">
                                                <li class="td td-amount">
                                                    <div class="item-amount">
                                                        合计：{{ v.totalprice }}
                                                        
                                                    </div>
                                                </li>
                                                <div class="move-right">
                                                    <li class="td td-status">
                                                        <div class="item-status">
                                                            <p class="Mystatus">买家已付款</p>
                                                            <p class="order-info"><a href="orderinfo.html">订单详情</a></p>
                                                        </div>
                                                    </li>
                                                    <li class="td td-change">
                                                        <div class="am-btn am-btn-danger anniu">
                                                            提醒发货</div>
                                                    </li>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    {% endfor %}

                                </div>
                            </div>
                        </div>
                        <div class="am-tab-panel am-fade" id="tab4">
                            <div class="order-top">
                                <div class="th th-item">
                                    商品
                                </div>
                                <div class="th th-price">
                                    单价
                                </div>
                                <div class="th th-number">
                                    数量
                                </div>
                                <div class="th th-operation">
                                    商品操作
                                </div>
                                <div class="th th-amount">
                                    合计
                                </div>
                                <div class="th th-status">
                                    交易状态
                                </div>
                                <div class="th th-change">
                                    交易操作
                                </div>
                            </div>

                            <div class="order-main">
                                <div class="order-list">
                                    {% for v in dsh %}

                                    <div class="order-status3">
                                        <div class="order-title">
                                            <div class="dd-num">订单编号：<a href="javascript:;">{{ v.id }}</a></div>
                                            <span>成交时间：{{ v.addtime }}</span>
                                            <!--    <em>店铺：小桔灯</em>-->
                                        </div>
                                        <div class="order-content">
                                            <div class="order-left">

                                                {% for v1 in v.orderinfo_set.all %}
                                                <ul class="item-list">
                                                    <li class="td td-item">
                                                        <div class="item-pic">
                                                            <a href="#" class="J_MakePoint">
                                                                <img src="
                                                            {{ v1.pic_url }}" class="itempic J_ItemImg">
                                                            </a>
                                                        </div>
                                                        <div class="item-info">
                                                            <div class="item-basic-info">
                                                                <a href="#">
                                                                    <p>{{ v1.yitle }}</p>
                                                        
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="td td-price">
                                                        <div class="item-price">
                                                            {{ v1.price }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-number">
                                                        <div class="item-number">
                                                            <span>×</span>{{ v1.num }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-operation">
                                                        <div class="item-operation">
                                                            <a href="refund.html">退款/退货</a>
                                                        </div>
                                                    </li>
                                                </ul>
                                                {% endfor %}


                                            </div>
                                            <div class="order-right">
                                                <li class="td td-amount">
                                                    <div class="item-amount">
                                                        合计：{{ v.totalprice }}
                                                    </div>
                                                </li>
                                                <div class="move-right">
                                                    <li class="td td-status">
                                                        <div class="item-status">
                                                            <p class="Mystatus">卖家已发货</p>
                                                            <p class="order-info"><a href="orderinfo.html">订单详情</a></p>
                                                            <p class="order-info"><a href="logistics.html">查看物流</a></p>
                                                            <p class="order-info"><a href="#">延长收货</a></p>
                                                        </div>
                                                    </li>
                                                    <li class="td td-change">
                                                        <div class="am-btn am-btn-danger anniu">
                                                            确认收货</div>
                                                    </li>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    {% endfor %}
                                </div>
                            </div>
                        </div>
                        <div class="am-tab-panel am-fade" id="tab5">
                            <div class="order-top">
                                <div class="th th-item">
                                    商品
                                </div>
                                <div class="th th-price">
                                    单价
                                </div>
                                <div class="th th-number">
                                    数量
                                </div>
                                <div class="th th-operation">
                                    商品操作
                                </div>
                                <div class="th th-amount">
                                    合计
                                </div>
                                <div class="th th-status">
                                    交易状态
                                </div>
                                <div class="th th-change">
                                    交易操作
                                </div>
                            </div>

                            <div class="order-main">
                                <div class="order-list">

                                {% for v in dpj %}
                                <div class="order-status4">
                                        <div class="order-title">
                                            <div class="dd-num">订单编号：<a href="javascript:;">{{ v.id }}</a></div>
                                            <span>成交时间：{{ v.addtime }}</span>

                                        </div>
                                        <div class="order-content">
                                            <div class="order-left">
                                                {% for v1 in v.orderinfo_set.all %}
                                                <ul class="item-list">
                                                    <li class="td td-item">
                                                        <div class="item-pic">
                                                            <a href="#" class="J_MakePoint">
                                                                <img src="{{ v1.pic_url }}" class="itempic J_ItemImg">
                                                            </a>
                                                        </div>
                                                        <div class="item-info">
                                                            <div class="item-basic-info">
                                                                <a href="#">
                                                                    <p>{{ v1.title }}</p>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="td td-price">
                                                        <div class="item-price">
                                                            {{ v1.price }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-number">
                                                        <div class="item-number">
                                                            <span>×</span>{{ v1.num }}
                                                        </div>
                                                    </li>
                                                    <li class="td td-operation">
                                                        <div class="item-operation">
                                                            <a href="refund.html">退款/退货</a>
                                                        </div>
                                                    </li>
                                                </ul>
                                                {% endfor %}
                                            </div>
                                            <div class="order-right">
                                                <li class="td td-amount">
                                                    <div class="item-amount">
                                                        合计：{{ v.totalprice }}
e                                                        
                                                    </div>
                                                </li>
                                                <div class="move-right">
                                                    <li class="td td-status">
                                                        <div class="item-status">
                                                            <p class="Mystatus">交易成功</p>
                                                            <p class="order-info"><a href="orderinfo.html">订单详情</a></p>
                                                            <p class="order-info"><a href="logistics.html">查看物流</a></p>
                                                        </div>
                                                    </li>
                                                    <li class="td td-change">
                                                        <a href="commentlist.html">
                                                            <div class="am-btn am-btn-danger anniu">
                                                                评价商品</div>
                                                        </a>
                                                    </li>
                                                </div>
                                            </div>
                                        </div>
                                </div>
                                    
                                {% endfor %} 
                                


                                </div>

                            </div>
                        </div>

                    </div>

                </div>
            </div>
        </div>
        
    </div>
    <aside class="menu">
        <ul>
            <li class="person">
                <a href="#">个人中心</a></li>
            <li class="person">
                <a href="{% url 'myhome_myinfo_introduction' %}">个人资料</a>
                <ul>
                    <li>
                        <a href="{% url 'myhome_myinfo_introduction' %}">个人信息</a></li>
                 <!--    <li>
                        <a href="safety.html">安全设置</a></li>
                    <li class="active"> -->
                        <a href="{% url 'myhome_myinfo_address' %}">收货地址</a></li>
                </ul>
            </li>
            <li class="person">
                <a href="{% url 'myhome_myinfo_order' %}">我的交易</a>
                <ul>
                    <li>
                        <a href="{% url 'myhome_myinfo_order' %}">订单管理</a></li>
                   <!--  <li> 
                        <a href="change.html">退款售后</a></li> -->
                </ul>
            </li>
           <!--  <li class="person">
                <a href="#">我的资产</a>
                <ul>
                    <li>
                        <a href="coupon.html">优惠券</a></li>
                    <li>
                        <a href="bonus.html">红包</a></li>
                    <li>
                        <a href="bill.html">账单明细</a></li>
                </ul>
            </li> -->
            <!-- <li class="person">
                <a href="#">我的小窝</a>
                <ul>
                    <li>
                        <a href="collection.html">收藏</a></li>
                    <li>
                        <a href="foot.html">足迹</a></li>
                    <li>
                        <a href="comment.html">评价</a></li>
                    <li>
                        <a href="news.html">消息</a></li>
                </ul>
            </li> -->
        </ul>
    </aside>
</div>

{% endblock %}
